package xin.mashibo.artcobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.artc.development.myble.sdk.CardInformation;

/**
 * @author MaShibo
 *         on 2018/3/26
 */
public class CardInfoExtend extends CardInformation implements Parcelable {


    public CardInfoExtend() {
    }

    public CardInfoExtend(CardInformation cardInformation) {
        cardId = cardInformation.cardId;
        cardType = cardInformation.cardType;
        cardVersion = cardInformation.cardVersion;
        provider = cardInformation.provider;
        signedDate = cardInformation.signedDate;
        expiredDate = cardInformation.expiredDate;
        vehicleNumber = cardInformation.vehicleNumber;
        userType = cardInformation.userType;
        plateColor = cardInformation.plateColor;
        vehicleMode = cardInformation.vehicleMode;
        balance = cardInformation.balance;
    }

    protected CardInfoExtend(Parcel in) {
        cardId = in.readString();
        cardType = in.readString();
        cardVersion = in.readString();
        provider = in.readString();
        signedDate = in.readString();
        expiredDate = in.readString();
        vehicleNumber = in.readString();
        userType = in.readString();
        plateColor = in.readString();
        vehicleMode = in.readString();
        balance = in.readInt();
    }

    public static final Creator<CardInfoExtend> CREATOR = new Creator<CardInfoExtend>() {
        @Override
        public CardInfoExtend createFromParcel(Parcel in) {
            return new CardInfoExtend(in);
        }

        @Override
        public CardInfoExtend[] newArray(int size) {
            return new CardInfoExtend[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(cardId);
        dest.writeString(cardType);
        dest.writeString(cardVersion);
        dest.writeString(provider);
        dest.writeString(signedDate);
        dest.writeString(expiredDate);
        dest.writeString(vehicleNumber);
        dest.writeString(userType);
        dest.writeString(plateColor);
        dest.writeString(vehicleMode);
        dest.writeInt(balance);
    }
}
